/**
 * author: wancheng
 * date: 2018年8月31日
 * des: 人员招聘-招聘规划
 */
import request from '@/utils/request'



export function findTask(params) {
  return request({
    url: '/acttaskmanages/findTask',
    method: 'get',
    params: params
  })
}
/**
 * getUserList,getOrgList ,getRoleList,getfollowList
 * 用户列表查询
 * @param {*} params
 */

export function getUserList(params) {
  return request({
    url: '/acttaskauthusers/findAll',
    method: 'get',
    params: params
  })
}
/**
 * 部门列表查询
 * @param {*} params
 */

export function getOrgList(params) {
  return request({
    url: '/acttaskauthorgs/findAll',
    method: 'get',
    params: params
  })
}
/**
 * 角色列表查询
 * @param {*} params
 */
export function getRoleList(params) {
  return request({
    url: '/acttaskauthroles/findAll',
    method: 'get',
    params: params
  })
}
/**
 * 流程列表查询
 * @param {*} params
 */
export function getfollowList(params) {
  return request({
    url: '/acttaskmanages/findAll',
    method: 'get',
    params: params
  })
}

/**
 * userAdd,roleAdd,orgAdd
 * 用户新增保存
 */
export function userAdd(data) {
  return request({
    url: '/acttaskauthusers/insert',
    method: 'post',
    params: data
  })
}


/**
 * 角色新增保存
 */
export function roleAdd(data) {
  return request({
    url: '/acttaskauthroles/insert',
    method: 'post',
    data: data
  })
}


/**
 * 部门新增保存
 */
export function orgAdd(data) {
  return request({
    url: '/acttaskauthorgs/insert',
    method: 'post',
    data: data
  })
}
/**
 * 编辑保存用户
 * @param {*} data
 */
export function updateUser(data) {
  return request({
    url: '/acttaskauthusers/update',
    method: 'put',
    data: data
  })
}
/** updateUser,updateRole,updateOrg
 * 编辑保存角色
 * @param {*} data
 */
export function updateRole(data) {
  return request({
    url: '/acttaskauthroles/update',
    method: 'put',
    data: data
  })
}

/**
 *
 * 编辑保存机构
 * @param {*} data
 */
export function updateOrg(data) {
  return request({
    url: '/acttaskauthorgs/update',
    method: 'put',
    data: data
  })
}
/**
 * 流程编辑
 * @param {*} data
 */
export function updateFollow(data) {
  return request({
    url: '/acttaskmanages/update',
    method: 'put',
    data: data
  })
}
/**
 * 角色
 * @param {*} data
 */
export function deleteRole(data) {
  return request({
    url: '/acttaskauthroles/delete',
    method: 'delete',
    params: data
  })
}
/**
 * 用户
 * @param {*} data
 */

export function deleteUser(data) {
  return request({
    url: '/acttaskauthusers/delete',
    method: 'delete',
    params: data
  })
}


/**
 * 机构  deleteOrg,deleteRole,deleteUser
 * @param {*} data
 */

export function deleteOrg(data) {
  return request({
    url: '/acttaskauthorgs/delete',
    method: 'delete',
    params: data
  })
}

